package main

import "fmt"

// 定义一个表示星期的枚举类型
type Weekday int

const (
	Sunday    Weekday = iota // 0，iota 会自动递增
	Monday                   // 1
	Tuesday                  // 2
	Wednesday                // 3
	Thursday                 // 4
	Friday                   // 5
	Saturday                 // 6
)

// 查询枚举名称的方法
func GetWeekdayName(day Weekday) string {
	switch day {
	case Sunday:
		return "Sunday"
	case Monday:
		return "Monday"
	case Tuesday:
		return "Tuesday"
	case Wednesday:
		return "Wednesday"
	case Thursday:
		return "Thursday"
	case Friday:
		return "Friday"
	case Saturday:
		return "Saturday"
	default:
		return "Unknown"
	}
}

// 使用示例
func main() {
	var today Weekday = Friday
	fmt.Println(GetWeekdayName(today)) // 输出 Friday

	var invalid Weekday = 10
	fmt.Println(GetWeekdayName(invalid)) // 输出 Unknown
}
